﻿<Window x:Class="HDFSViewer.View.AddFileWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        Title="Add File" Height="480" Width="640" WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="26"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="20"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <Label Content="Path:" Grid.Column="0"/>
            <TextBlock Grid.Column="1" Text="{Binding Path=DirectoryPath}"></TextBlock>
        </Grid>
        <ToolBar Grid.Row="1">
            <Label Content="Name:"></Label>
            <TextBox Width="150" Text="{Binding Path=Name}" IsReadOnly="{Binding Path=NameIsReadonly}"></TextBox>
            <Label Content="Encoding:" VerticalAlignment="Center"/>
            <ComboBox Width="120" SelectedValue="{Binding Path=SelectedEncoding,Mode=TwoWay}">
                <ComboBox.Items>
                    <sys:String>HEX</sys:String>
                    <sys:String>ASCII</sys:String>
                    <sys:String>UTF8</sys:String>
                    <sys:String>Unicode</sys:String>
                    <sys:String>GB2312</sys:String>
                    <sys:String>GBK</sys:String>
                    <sys:String>BigEndianUnicode</sys:String>
                    <sys:String>UTF32</sys:String>
                    <sys:String>UTF7</sys:String>
                </ComboBox.Items>
            </ComboBox>
            <Button x:Name="btnSave" ToolTip="Save" Command="{Binding Path=Save}" Click="btnSave_Click">
                <Button.Content>
                    <Image Source="Image/Save.png"></Image>
                </Button.Content>
            </Button>
        </ToolBar>

        <TextBox Grid.Row="2" Text="{Binding Path=Content}" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"/>
        <StatusBar Grid.Row="3"/>
    </Grid>
</Window>
